package org.flycloud.web.sso.common;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

import org.flycloud.web.util.CookieUtil;

public class SystemSession {

	public static final String CREDENTIALS = "6bf968f0c7b39ddbb7c8aa836b74d092060ed9b85b620a7fb088ecc48c6b3efd696bbd820f74c14f66c80c86c557c4bfda51b8a3743d3d568cc5c08410b7bb6a";

	public static final String PASSWORD = "lvadmin";

	public static String getTokenString(HttpServletRequest request) {
		String token = request.getParameter(Token.TOKEN);
		if (null == token) {
			Cookie cookie = CookieUtil.getCookieByName(request, Token.TOKEN);
			if (null != cookie) {
				token = cookie.getValue();
			}
		}
		return token;
	}
}
